<template>
  <div class="dtzj">
    <div class="nav">
      <section @click="all()">全部</section>
      <section @click="one()">一级</section>
      <section @click="two()">二级</section>
    </div>
    <component :is="com"></component>
  </div>
</template>

<script>
import All from "@/components/fenxiao/main/all.vue"
import One from "@/components/fenxiao/main/one.vue"
import Two from "@/components/fenxiao/main/two.vue"
export default {
    data(){
        return {
            com:All
        }
    },
    methods:{
        all(){
            this.com = All;
        },
        one(){
            this.com = One;
        },
        two(){
            this.com = Two;
        },
    }
}
</script>

<style scoped>
.nav {
  height: 38rem;
  line-height: 38rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-bottom: 1px solid #eee;
}
component {
  flex: 1;
  overflow: auto;
}
</style>
